import request from '@/utils/request'

/* 添加或修改购物车商品 */
export function addOrUpdateShoppingCart(data) {
  return request({
    url: '/shoppingCart/addOrUpdateShoppingCart',
    method: 'post',
    data:data
  })
}
/* 获取购物车商品数量 */
export function getShoppingCartNum() {
  return request({
    url: '/shoppingCart/getShoppingCartNum',
    method: 'get'
  })
}

/* 获取购物车商品数量 */
export function getShoppingCartData(data) {
  return request({
    url: '/shoppingCart/getShoppingCartData',
    method: 'post',
    data:data
  })
}
/* 根据购物车id集合，批量删除购物车数据 */
export function deleteShoppingCart(cartIds) {
  return request({
    url: '/shoppingCart/deleteShoppingCart',
    method: 'post',
    data:{
      cartIds:cartIds
    }
  })
}

